<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: focus
  Date: 2018/1/8
  Time: 9:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="page-control">
    <ul class="pagination pull-right">
        <c:set var="c" value="${result.currentpage}" scope="page"/>
        <c:set var="e" value="${result.totalpage}" scope="page"/>
        <c:if test="${c-3 gt 1}">
            <li><a href="/index/new/1">&lt;&lt;</a></li>
        </c:if>
        <c:if test="${c ne 1}">
            <li><a href="/index/new/${result.previousPage}">&lt;</a></li>
        </c:if>
        <c:forEach var="p" items="${result.pageBar}">
            <c:if test="${p eq c}">
                <li class="active"><a href="javascript:;">${p}</a></li>
            </c:if>
            <c:if test="${p ne c}">
                <li><a href="/index/new/${p}">${p}</a></li>
            </c:if>
        </c:forEach>
        <c:if test="${c ne e}">
            <li><a href="/index/new/${result.nextPage}">&gt;</a></li>
        </c:if>
        <c:if test="${c+3 lt e}">
            <li><a href="/index/new/${result.totalpage}">&gt;&gt;</a></li>
        </c:if>
    </ul>
</div>
